<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: #000;
        }

        .container {
            background-color: #f1f1f1;
        }

        .left {
            float: left;
        }

        .bfc {
            overflow: hidden;
        }
    </style>
</head>

<body>
    <div class="container bfc">
        <img src="http://www.imooc.com/static/img/logo.png" alt="" class="left bfc" style="margin-right: 10px;">
        <p>一段文字</p>
    </div>
</body>

</html>